using System;
using System.Collections.Generic;
using DynamicChart.Annotation;

namespace DynamicChart.Service.ActuatorMethod;

[ActuatorMethodClass("测试")]
public class TestMethod
{
    [ActuatorMethodDescription("测试1")]
    public static IDictionary<string, object> Test1(IDictionary<string, object> param)
    {
        IDictionary<string, object>  result = new Dictionary<string, object>();

        for (int i = 0; i < 3; i++)
        {
            var date = DateTime.Today.AddDays(i).ToString("yyyy-MM-dd");
            var innerDict = new Dictionary<string, object>
            {
                { "1", new Random().Next(100, 1000) },
                { "2", new Random().Next(100, 1000) },
                { "3", new Random().Next(100, 1000) }
            };

            result[date] = innerDict;
        }

        return result;
    }
}